#ifndef IFPREPROCESSOR_H
#define IFPREPROCESSOR_H

#include <clang/Basic/SourceLocation.h>
#include <clang/Lex/Preprocessor.h>

namespace rocket {
namespace testif {

struct MacroExpansion {
  struct MacroReplace {
    std::string expansion;
  };

  std::map<clang::SourceLocation, MacroReplace> replaces;

  void InsertTextAfter(clang::SourceLocation loc, const std::string& str);
  void InsertTextBefore(clang::SourceLocation loc, const std::string& str);
};

MacroExpansion parseMacrosExpansion(clang::Preprocessor& PP);

}  // namespace testif
}  // namespace rocket

#endif  // IFPREPROCESSOR_H
